import { createRouter, createWebHashHistory } from 'vue-router'
import index from '@/views/index.vue'
import cutDemandBill from '@/views/cutDemandBill.vue'
import sectionList from '@/views/sectionList.vue'
import stickList from '@/views/stickList.vue'
import cutSolution from '@/views/cutSolution.vue'
import metailList from '@/views/metailList.vue'
import coilsList from '@/views/coilsList.vue'
import processDarft from '@/views/processDarft.vue'
import proposeSimple from '@/views/proposeSimple.vue'
import proposeListAdv from '@/views/proposeListAdv.vue'
import divideDemandBill from '@/views/divideDemandBill.vue'
import divideDemandSum from '@/views/divideDemandSum.vue'
import cutDemandSum from '@/views/cutDemandSum.vue'
import divideProposeList from '@/views/divideProposeList.vue'
import coilCutOrder from '@/views/coilCutOrder.vue'
import boardList from '@/views/boardList.vue'
import boardCutDemandBill from '@/views/boardCutDemandBill.vue'
import materialList from '@/views/materialList.vue'
import locationList from '@/views/locationList.vue'
import qrcodeList from '@/views/qrcodeList.vue'
import storageView from '@/views/storageView.vue'
import storageView2 from '@/views/storageView2.vue'
import stockorderList from '@/views/stockorderList.vue'
import arriveList from '@/views/arriveList.vue'
import moveList from '@/views/moveList.vue'
import requireOrderList from '@/views/requireOrderList.vue'
import requireCalendar from '@/views/requireCalendar.vue'
import mtlcallList from '@/views/mtlcallList.vue'
import pickList from '@/views/pickList.vue'

//下面是移动端的

import setlocation from '@/views/mobile/setlocation.vue'
import iqc from '@/views/mobile/iqc.vue'
import callmaterial from '@/views/mobile/callmaterial.vue'
import stockout from '@/views/mobile/stockout.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  //@ts-ignore
  routes: [
    {
      path: '/',
      name: '/',
      meta: { header: '首页', ismenu: true },
      children: [
        {
          path: '/',
          name: '/',
          component: index,
          meta: { header: '说明', ismenu: true }
        }
      ]
    },
    {
      path: '/base',
      name: 'base',
      meta: { header: '基础', ismenu: true },
      children: [
        {
          path: '/metailList',
          name: 'metailList',
          component: metailList,
          meta: { header: '材质', ismenu: true }
        },
        {
          path: '/sectionList',
          name: 'sectionList',
          component: sectionList,
          meta: { header: '截面', ismenu: true }
        },
        {
          path: '/coilsList',
          name: 'coilsList',
          component: coilsList,
          meta: { header: '卷料清单', ismenu: true }
        },
        {
          path: '/stickList',
          name: 'stickList',
          component: stickList,
          meta: { header: '棒料清单', ismenu: true }
        },
        {
          path: '/boardList',
          name: 'boardList',
          component: boardList,
          meta: { header: '板料清单', ismenu: true }
        },
        {
          path: '/cutSolution',
          name: 'cutSolution',
          component: cutSolution,
          meta: { header: '开料方案', ismenu: true }
        },
        {
          path: '/materialList',
          name: 'materialList',
          component: materialList,
          meta: { header: '物料', ismenu: true }
        },
        {
          path: '/locationList',
          name: 'locationList',
          component: locationList,
          meta: { header: '库位', ismenu: true }
        },
        {
          path: '/qrcodeList',
          name: 'qrcodeList',
          component: qrcodeList,
          meta: { header: '条码', ismenu: true }
        },
        {
          path: '/storageView',
          name: 'storageView',
          component: storageView,
          meta: { header: '库位库存', ismenu: true }
        },
        {
          path: '/storageView2',
          name: 'storageView2',
          component: storageView2,
          meta: { header: '物料库存', ismenu: true }
        }
      ]
    },
    {
      path: '/coil',
      name: 'coil',
      meta: { header: '卷料', ismenu: true },
      children: [
        {
          path: '/cutDemandBill',
          name: 'cutDemandBill',
          component: cutDemandBill,
          meta: { header: '开料需求单', ismenu: true }
        },
        {
          path: '/cutDemandSum',
          name: 'cutDemandSum',
          component: cutDemandSum,
          meta: { header: '开料需求汇总', ismenu: true }
        },
        {
          path: '/processDarft',
          name: 'processDarft',
          component: processDarft,
          meta: { header: '运算草稿', ismenu: true }
        },
        {
          path: '/proposeListAdv',
          name: 'proposeListAdv',
          component: proposeListAdv,
          meta: { header: '运算建议[高级]', ismenu: true }
        },
        {
          path: '/proposeSimple',
          name: 'proposeSimple',
          component: proposeSimple,
          meta: { header: '运算建议[简洁]', ismenu: true }
        },
        {
          path: '/coilCutOrder',
          name: 'coilCutOrder',
          component: coilCutOrder,
          meta: { header: '卷料开工单', ismenu: true }
        }
      ]
    },
    {
      path: '/stick',
      name: 'stick',
      meta: { header: '棒料', ismenu: true },
      children: [
        {
          path: '/divideDemandBill',
          name: 'divideDemandBill',
          component: divideDemandBill,
          meta: { header: '分割需求单', ismenu: true }
        },
        {
          path: '/divideDemandSum',
          name: 'divideDemandSum',
          component: divideDemandSum,
          meta: { header: '分割需求汇总', ismenu: true }
        },
        {
          path: '/divideProposeList',
          name: 'divideProposeList',
          component: divideProposeList,
          meta: { header: '分割试算结果', ismenu: true }
        }
      ]
    },
    {
      path: '/board',
      name: 'board',
      meta: { header: '板料', ismenu: true },
      children: [
        {
          path: '/boardCutDemandBill',
          name: 'boardCutDemandBill',
          component: boardCutDemandBill,
          meta: { header: '开板需求单', ismenu: true }
        }
      ]
    },
    {
      path: '/arrive',
      name: 'arrive',
      meta: { header: '收货', ismenu: true },
      children: [
        {
          path: '/stockorderlist',
          name: 'stockorderlist',
          component: stockorderList,
          meta: { header: '在途订单', ismenu: true }
        },
        {
          path: '/arriveList',
          name: 'arriveList',
          component: arriveList,
          meta: { header: '到货报检', ismenu: true }
        },
        {
          path: '/moveList',
          name: 'moveList',
          component: moveList,
          meta: { header: '搬运工单', ismenu: true }
        }
      ]
    },
    {
      path: '/require',
      name: 'require',
      meta: { header: '预定', ismenu: true },
      children: [
        {
          path: '/requireOrderList',
          name: 'requireOrderList',
          component: requireOrderList,
          meta: { header: '需求订单', ismenu: true }
        },
        {
          path: '/requireCalendar',
          name: 'requireCalendar',
          component: requireCalendar,
          meta: { header: '用料看板', ismenu: true }
        }
      ]
    },
    {
      path: '/pick',
      name: 'pick',
      meta: { header: '发料', ismenu: true },
      children: [
        {
          path: '/mtlcallList',
          name: 'mtlcallList',
          component: mtlcallList,
          meta: { header: '叫料明细', ismenu: true }
        },
        {
          path: '/pickList',
          name: 'pickList',
          component: pickList,
          meta: { header: '备料单', ismenu: true }
        }
      ]
    },
    {
      path: '/pda',
      name: 'pda',
      meta: { header: '现场', ismenu: true },
      children: [
        {
          path: '/iqc',
          name: 'iqc',
          component: iqc,
          meta: { header: '质检', ismenu: true }
        },
        {
          path: '/setlocation',
          name: 'setlocation',
          component: setlocation,
          meta: { header: '上架', ismenu: true }
        },
        {
          path: '/callmaterial',
          name: 'callmaterial',
          component: callmaterial,
          meta: { header: '叫料', ismenu: true }
        },
        {
          path: '/stockout',
          name: 'stockout',
          component: stockout,
          meta: { header: '出库', ismenu: true }
        }
      ]
    }
  ]
})

export default router
